import requests
from TinyShop17.CASE import LoginTinyShop


class Choose:
    def __init__(self):
        self.session = LoginTinyShop.Login().start()
        print(self.session)

    def ChooseGoods(self):
        url = 'http://192.168.10.139/ty17/TinyShop_v1.7/index.php?con=index&act=cart_add'
        data = {
            'id': '69',
            'num': 'a.txt'
        }
        html = self.session.post(url, data=data).json()
        print(html)
        url2 = 'http://192.168.10.139/ty17/TinyShop_v1.7/index.php?con=index&act=get_review'
        data = {
            'id': '17',
            'score': 'c',
            'page': 'a.txt'
        }
        html2 = self.session.post(url2, data=data).json()
        print(html2['status'])
        url3 = 'http://192.168.10.139/ty17/TinyShop_v1.7/index.php?con=index&act=cart_add'
        data3 = {
            'num': 'a.txt',
            'id': '69'
        }
        html3 = self.session.post(url3, data=data3).json()
        print(html3)


if __name__ == "__main__":
    Choose().ChooseGoods()
